<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <button onclick="f1()">按钮1</button>
    <hr>
    <button onclick="goFor()">前进</button>
    <button onclick="goBack()">后退</button>
    <script>
        var blood = 100;
        console.log(window);
        console.log(location);

        function f1(){
            console.log("i am f1");
            location.href = "http://www.qq.com";
        }
        function goFor(){
            history.forward();
        }
        
        function goBack(){
            history.back();
        }

        console.log(screen.availHeight);
        console.log(screen.availWidth);
    </script>
</body>
</html>